			
            <div id="title-bar">
                <div id="element-count">
                    <div id="info-element">
                        <div class="number"><?php echo $countusers;?></div>
                        <span>khách hàng</span>
                    </div>
                    <div id="img-element">
                    	<div class="nav-icons ico-users"></div>
                    </div>
                </div>
          
                <h2 id="title-page">Quản lý khách hàng <a href="#modal_add_user" role="button" class="label" data-toggle="modal">+ thêm người dùng</a></h2>
            </div>
            <div class="row-fluid">
            	<?php if(isset($textkeysearch)):?>
                
                <h4>
                	CÓ <?php echo ($listusers)?count($listusers):0;?> KẾT QUẢ ĐƯỢC TÌM KIẾM TỪ "<em><?php echo $textkeysearch?></em>"
                    <a href="" onClick="parent.location='';return false;"><i class="icon-remove-sign"></i></a>
                </h4>
                <?php endif;?>
                
            </div>
            <div class="row-fluid">
            	<div class="span8">  
                
                </div>
            	<div class="span4">
                	<div class="pull-right">
                 
                        <?php echo form_open('administrator/user/manager', 'id="formSearch" class="form-inline"') ?>
                        	<div class="input-append">
                            	<input type="text" value="<?php echo set_value('keysearch')?>" name="keysearch" id="keysearch" placeholder="Nhập từ khóa" class="input-medium" autocomplete="off" />
                                <select id="field-search" name="field_search">
                                	<option value="1" <?php echo set_select('field_search',1)?>>Tài khoản</option>
                                    <option value="2" <?php echo set_select('field_search',2)?>>Họ tên</option>
                                </select>
                                <button class="btn">
                                	<i class="icon-search"></i>
                                </button>
                            </div>
                        <?php echo form_close() ?>
                  
                    </div>
                </div>
            </div>
            <div class="clearfix"></div>
 
                <table class="table table-striped table-bordered genaral-tables" width="100%">
                	<thead>
                    	<tr>
                        	<th width="3%">#</th>
                            <th width="25%">Tên tài khoản</th>
                            <th width="20%">Họ tên</th>
                            <th width="29%">Email</th>
                            <th width="12%">Trạng thái</th>
                            <th width="11%">Hành động</th>
                        </tr>
                    </thead>
                    <tbody>
                    	<?php if($listusers): foreach($listusers as $row){?>
                        
                        <tr rel="<?php echo $row->UserId ?>" id="table_row_<?php echo $row->UserId?>">
                            <td class="text-center stt"><?php echo $row->stt ?></td>
                            <td>
                            	<a href=""><?php echo $row->UserName ?></a>
                            </td>
                            <td><?php echo $row->FullName; ?></td>
                            <td><?php echo $row->Email; ?></td>
                            <td class="text-center status"><small><?php if($row->Status==1){echo "<span class='label label-success'>Hoạt động</span>";}elseif($row->Status==2){echo "<span class='label'>Không hoạt động</span>";} ?></small></td>
                            <td class="table-col-action text-center">
                                <a class="<?php echo ($row->UserId==$this->session->userdata('UserId'))?'':'btn-change-status';?>" rel="tooltip" href="" title="Đổi trạng thái" status="<?php echo $row->Status?>"><i class="<?php echo ($row->Status==1)?'icon-ok-sign':(($row->Status==2)?'icon-remove-sign':'');?>"></i></a>
                                <a rel="tooltip" href="<?php echo base_url('administrator/user/modify?userid='.$row->UserId) ?>" title="Sửa mục">
                                	<i class="icon-pencil"></i>
                                </a>
                                <a class="<?php echo ($row->UserId==$this->session->userdata('UserId'))?'':'btn-delete';?>" rel="tooltip" href="" title="Xóa mục" >
                                	<i class="icon-remove"></i>
                                </a>
                            </td>
                        </tr>
                       
                        <?php } else: ?>
                        
                        <tr>
                            <td class="text-center" colspan="6">
                                Không có mục nào được tìm thấy
                            </td>
                        </tr>
                       	<?php endif;?>
                        
                        <tr>
                            <td class="tableFooter" colspan="6">
                                <div class="pull-left"></div>
                                <div class="pagination pull-right">
                                    <?php echo $paging ?>
                                    
                                </div>
                            </td>
                        </tr>
                    </tbody>
       			</table>
                
                <!-- Modal-->
                <div id="modal_add_user" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <?php echo form_open('administrator/user/add') ?>
                
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h3 id="myModalLabel">Thêm người dùng</h3>
                    </div>
                    <div class="modal-body">
                    	<div class="editor-field">
                        	<label>Tên tài khoản</label>
                            <input class="input-fixedfull" name="UserName" type="text" />
                        </div>
                        <div class="editor-field">
                        	<label>Họ tên người dùng</label>
                            <input class="input-fixedfull" name="FullName" type="text" />
                        </div>
                        <div class="editor-field">
                        	<label>Địa chỉ email</label>
                            <input class="input-fixedfull" name="Email" type="email" />
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button class="btn btn-small" data-dismiss="modal" aria-hidden="true">Hủy bỏ</button>
                        <button class="btn btn-success btn-small" type="submit">Thêm mới</button>
                    </div>
                <?php echo form_close() ?>
                
                </div> 
                <script type="text/javascript">
                    $('#modal_add_user').modal('hide');
                </script>
      